using System.ComponentModel.DataAnnotations;
using Medical.Domain.Enum;

namespace Medical.Api.Write.Dto.BasicManagement.DeviceDictionaryDto
{
    /// <summary>
    /// 创建设备数据传输对象
    /// </summary>
    public class CreateEquipmentDto
    {
        /// <summary>
        /// 设备编码
        /// </summary>
        [Required(ErrorMessage = "设备编码不能为空")]
        [StringLength(50, ErrorMessage = "设备编码长度不能超过50个字符")]
        public string EquipmentCode { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        [Required(ErrorMessage = "设备名称不能为空")]
        [StringLength(100, ErrorMessage = "设备名称长度不能超过100个字符")]
        public string EquipmentName { get; set; }

        /// <summary>
        /// 设备类型 (清洗/1、消毒/2、灭菌/3)
        /// </summary>
        [Required(ErrorMessage = "设备类型不能为空")]
        [Range(1, 3, ErrorMessage = "设备类型只能是1(清洗)、2(消毒)或3(灭菌)")]
        public int EquipmentType { get; set; }

        /// <summary>
        /// 生产厂家 (供应商)
        /// </summary>
        [Required(ErrorMessage = "生产厂家不能为空")]
        public SupplierEnum Manufacturer { get; set; }

        /// <summary>
        /// 状态(0:禁用,1:启用)
        /// </summary>
        [Range(0, 1, ErrorMessage = "状态只能是0(禁用)或1(启用)")]
        public int Status { get; set; } = 1;
    }
}